package leetCode.hw.string;

public class HJ2Solution implements HJ2 {

    @Override
    public int calCharNum(String str, String ch) {
        int result = 0;
        str = str.toUpperCase();
        ch = ch.toUpperCase();
        char cha = ch.toCharArray()[0];
        for(char a:str.toCharArray()) {
            if(cha==a) result++;
        }
        return result;
    }

}
